lib_sources_path = ../hw3
source_files = ${lib_sources_path}/list.c ${lib_sources_path}/user_io.c ${lib_sources_path}/user_threads.c ${lib_sources_path}/user_mutex.c
object_files = list.o user_io.o user_threads.o user_mutex.o

.PHONY: all

libuthreads.a: $(source_files)
	gcc -c -Werror -DNDEBUG  $(source_files)
	#gcc -c -Werror -DENABLE_DPRINT $(source_files)
	ar rsc libuthreads.a $(object_files)
	rm $(object_files)

runMe: *.c libuthreads.a
	gcc *.c libuthreads.a -o runMe
	

all: libuthreads.a runMe

clean:
	rm libuthreads.a
	rm runMe
